package com.ziyun.erp.modules.material.service;

import com.baomidou.mybatisplus.service.IService;
import com.ziyun.erp.modules.material.entity.MaterialEntity;
import com.ziyun.erp.modules.material.entity.storeStockMaterialEntity;
import com.ziyun.erp.modules.supp.entity.SellerInfoEntity;
import io.renren.common.utils.R;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Author ZhaoWei
 * @Date 2018/11/08 08:45
 * @Version V1.0
 */
public interface StoreStockMaterialService extends IService<storeStockMaterialEntity> {


	int insert(Integer stockId, String materialId, BigDecimal materialQuantity,BigDecimal cost,BigDecimal money,String unit,String remark);

	List<SellerInfoEntity> selectCostByMaterialId(Integer materialId);
	
	Integer getStockId(Integer ErpstockId,String materialId);

	int updateCost(String materialId, Integer storeStockMaterialStockId, BigDecimal cost);

	int insertCost(String materialId, Integer erpstockId, BigDecimal cost);

	R saveOrInsert(MaterialEntity material, @NotNull List<SellerInfoEntity> sellerInfoEntity);

	void checkOutUpdate(Integer stockMaterialId, BigDecimal tempResult);

	void checkInUpdate(Integer stockId, String materialId, BigDecimal checkResult);
}
